package com.gp.zh.controller;

import com.gp.entity.AirStatistics;
import com.gp.entity.Result;
import com.gp.zh.service.AirStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/airStatistics")
@CrossOrigin
public class AirStatisticsController {
    @Autowired
    private AirStatisticsService airStatisticsService;

    @GetMapping("/getList")
    public Result getAirStatistics() {
        List<AirStatistics> airStatistics = airStatisticsService.getAirStatistics();
        return Result.success(airStatistics);
    }



}
